Skip to content

fix: clarify checkout step loading copy#1408

Merged
superdav42 merged 1 commit into
mainfrom
fix/checkout-step-message
Jun 11, 2026
Merged

fix: clarify checkout step loading copy#1408
superdav42 merged 1 commit into
mainfrom
fix/checkout-step-message

Conversation

@superdav42

@superdav42 superdav42 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Show “Recording Your Responses...” while a multi-step checkout advances before the final step.
  • Keep the existing “Provisioning your site — this can take up to 60 seconds.” copy for the final checkout step.
  • Expose the step-state/loading-copy variables and add regression coverage for the distinction.

Verification

  • vendor/bin/phpcs inc/checkout/class-checkout.php tests/unit/Checkout_Step_Fields_Test.php
  • vendor/bin/phpunit --filter Checkout_Step_Fields_Test
  • eslint assets/js/checkout.js --ignore-pattern '*.min.js' (via local hook/lint-staged during commit)

aidevops.sh v3.20.55 plugin for OpenCode v1.17.3 with gpt-5.5

Summary by CodeRabbit

  • New Features

    • Checkout now displays context-aware loading messages: "Recording Your Responses…" on standard steps and "Provisioning your site…" on the final step.
  • Tests

    • Added test coverage for step-specific checkout loading messages.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR adds step-specific loading messages to the checkout flow. The backend now exposes an is_last_step flag and localized recording_responses copy, allowing the frontend to display appropriate status text—"Recording Your Responses…" for intermediate steps and "Provisioning your site…" for the final step. Tests verify the step-dependent behavior.

Changes

Step-Specific Checkout Loading Messages

Layer / File(s) Summary
Backend: Step-aware checkout variables and translation
inc/checkout/class-checkout.php, lang/ultimate-multisite.pot
Backend checkout class adds is_last_step boolean and recording_responses i18n key to the checkout variables dictionary returned to JavaScript. Translation catalog entry supports the new localized message.
Frontend: Conditional loading message rendering
assets/js/checkout.js
JavaScript conditional selects between "Recording Your Responses…" and "Provisioning your site…" loading messages based on the wu_checkout.is_last_step flag when the checkout form is submitted.
Tests: Step-specific loading behavior validation
tests/unit/Checkout_Step_Fields_Test.php
Test fixture helper build_checkout_variables() constructs step-specific checkout variables. New test asserts account and payment steps produce different is_last_step values and loading copy.

Sequence Diagram

sequenceDiagram
  participant User
  participant Backend
  participant Frontend
  participant DOM
  Backend->>Backend: get_checkout_variables()
  Backend->>Frontend: Pass is_last_step + recording_responses
  User->>Frontend: Submit checkout form
  Frontend->>Frontend: Check wu_checkout.is_last_step
  alt is_last_step = true
    Frontend->>DOM: Display "Provisioning your site…"
  else is_last_step = false
    Frontend->>DOM: Display "Recording Your Responses…"
  end
  DOM->>User: Show loading spinner with status
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

review-feedback-scanned, status:available

Poem

🐰 A rabbit checks out with style,
Step by step, mile after mile,
"Recording responses" on the way,
"Provisioning soon!" at journey's day,
Loading messages, clear and bright,
Makes the checkout flow just right! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: clarify checkout step loading copy' directly describes the main change: updating checkout loading UI messages to distinguish between intermediate and final steps.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/checkout-step-message

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@superdav42 superdav42 merged commit f7f9405 into main Jun 11, 2026
10 of 11 checks passed
@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant